import request from '@/utils/request'

// 获取企业列表
export function getListAPI(params) {
    return request({
        url: '/park/enterprise',
        params
    })
}


// 获取行业列表
export function getIndustryListAPI() {
    return request({
        url: '/park/industry'
    })
}



// 增加企业
export function createEnterpriseAPI(data) {
    return request({
        url: '/park/enterprise',
        method: 'POST',
        data
    })
}

// 获取企业详情
export function getEnterpriseDetailAPI(id) {
    return request({
        url: `/park/enterprise/${id}`
    })
}

// 更新企业详情
export function updateEnterpriseAPI(data) {
    return request({
        url: '/park/enterprise',
        method: 'PUT',
        data
    })
}

// 删除企业
export function deleteEnterpriseAPI(id) {
    return request({
        url: `/park/enterprise/${id}`,
        method: 'DELETE'
    })
}


// 添加合同
export function addRentAPI(data) {
    return request({
        url: '/park/enterprise/rent',
        method: 'POST',
        data
    })
}


// 获取合同列表
export function getRentListAPI(id) {
    return request({
        url: `/park/enterprise/rent/${id}`
    })
}


//退租
export function outRentAPI(rentId) {
    return request({
        url: `/park/enterprise/rent/${rentId}`,
        method: 'PUT'
    })
}

